import React,{ useState } from 'react'

export default function Login() {
    const [username, setusername] = useState('');
    const [password, setpassword] = useState('');
  return (
    <div>
        用户名：<input type='text' onChange={(evt)=>{
            setusername(evt.target.value)
        }}></input>
        密码：<input type='password' onChange={(evt)=>{
            setpassword(evt.target.value)
            console.log(password)
        }}></input>
        <button onClick={()=>{
            localStorage.setItem("token",[username,password])
        }}>登录</button>
    </div>
  )
}
